package nowcode;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class ReverseNumber {
    public static void main(String[] args) {
        InputStream is = System.in;
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            String inputStr = br.readLine();
            int originNum = Integer.parseInt(inputStr);
            myFunction(originNum);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private static void myFunction(int originNum) {
        int num = originNum;
        int resultNum = 0;
        while (num > 0) {
            resultNum = resultNum*10 + num%10;
            num = num/10;
        }
        System.out.println(resultNum + originNum);
    }
}
